package com.vegetable.modules.entity.outbound.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import com.vegetable.modules.entity.finance.FinancialCollectionDetail;
import com.vegetable.modules.entity.inbound.OrderCost;
import com.vegetable.modules.entity.outbound.SalesOutCarryOn;
import com.vegetable.modules.entity.outbound.SalesOutDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 销售出库单
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SalesOut对象", description="销售出库单")
public class SalesOutQueryPO implements Serializable {

    private static final long serialVersionUID = 1L;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty(value = "状态0未出库，1已出库 2部分出库")
    private Integer state;

    @ApiModelProperty(value = "状态0未对冲，1已对冲")
    private Integer hedgingState;

    @ApiModelProperty(value = "商户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long customerId;


    @ApiModelProperty(value = "台账标识 0寿光 1河北")
    private Integer regionId;


    @ApiModelProperty(value = "订单编号")
    private String docNo;

    @ApiModelProperty(value = "排序依据")
    private String orderBy = "order_time";

    @ApiModelProperty(value = "排序依据")
    private String orderSort = "desc";

    @ApiModelProperty(value = "业务员")
    private String salesman;

    @ApiModelProperty(value = "业务员ID，关联sys_user表")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long salesmanId;

    private Long  limit = 15L;
    /**
     * 当前页，默认 1
     *
     * @return 当前页
     */
    private Long page = 1L;
    
    /**
     * 客户ID列表，用于数据权限控制
     */
    @TableField(exist = false)
    private List<Long> customerIds;

}
